<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<!DOCTYPE html>
<html>

<head>
<meta charset="UTF-8">
<title>欢迎页面-X-admin2.0</title>
<meta name="renderer" content="webkit">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport"
	content="width=device-width,user-scalable=yes, minimum-scale=0.4, initial-scale=0.8,target-densitydpi=low-dpi" />
<link rel="shortcut icon" href="/favicon.ico" type="image/x-icon" />
<link rel="stylesheet" href="./css/font.css">
<link rel="stylesheet" href="./css/xadmin.css">
<script type="text/javascript"
	src="https://cdn.bootcss.com/jquery/3.2.1/jquery.min.js"></script>
<script type="text/javascript" src="./lib/layui/layui.js"
	charset="utf-8"></script>
<script type="text/javascript" src="./js/xadmin.js"></script>
<!-- 让IE8/9支持媒体查询，从而兼容栅格 -->
<!--[if lt IE 9]>
      <script src="https://cdn.staticfile.org/html5shiv/r29/html5.min.js"></script>
      <script src="https://cdn.staticfile.org/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->
<script type="text/javascript">
$(function(){
	$("#dosubmit").click(function() {
		if($("input:checkbox[name=context]").is(':checked')) {
			if($("input:checkbox[name=mission]").is(':checked')) {
				return true;
			} else {
				alert("请选择'委托任务'");
				return false;
			}
		} else {
			alert("请选择'委托内容'");
			return false;
		}
		
	})
})
</script>
</head>

<body>
	<div class="x-body">
		<table class="layui-table">
			<xblock>
			<button class="layui-btn layui-btn-danger">赔案委托信息</button>
			</xblock>
			<form class="layui-form" action="insertEntrust.html">
				<tr>
					<td style="width: 110px;"><span class="x-red">*</span>保单号</td>
					<c:if test="${sessionScope.reportInfo != null}">
						<td style="width: 400px;"><input type="text" id="insuranceId"
							name="insuranceId" required="" lay-verify="email" autocomplete="off"
							class="layui-input"
							value="${sessionScope.reportInfo.insuranceId}"></td>
					</c:if>

					<td style="width: 110px;"><span class="x-red">*</span>报案号</td>
					<c:if test="${sessionScope.reportInfo != null}">
						<td style="width: 400px;"><input type="text" id="reportNo"
							name="reportNo" required="" lay-verify="email" autocomplete="off"
							class="layui-input" value="${sessionScope.reportInfo.reportNo}"></td>
					</c:if>

					<td style="width: 110px;"><span class="x-red">*</span>投保人</td>
					<c:if test="${sessionScope.reportInfo != null}">
						<td style="width: 400px;"><input type="text"
							id="policyHolder" name="policyHolder" required=""
							lay-verify="email" autocomplete="off" class="layui-input"
							value="${sessionScope.p.policyHolder}"></td>
					</c:if>

				</tr>
				<tr>
					<td style="width: 110px;"><span class="x-red">*</span>委托内容</td>
					<td colspan="5"><input type="checkbox" name="context"
						lay-skin="primary" value="保险事故处理及现场拍照">保险事故处理及现场拍照&nbsp;&nbsp;&nbsp;&nbsp; <input
						type="checkbox" name="context" lay-skin="primary" value="保险事故查勘及出具查勘报告、定损单">保险事故查勘及出具查勘报告、定损单<br />
						<input type="checkbox" name="context" lay-skin="primary" value="确定保险事故损失">确定保险事故损失&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
						<input type="checkbox" name="context" lay-skin="primary" value="车辆盗抢事故协查">车辆盗抢事故协查<br />
						<input type="checkbox" name="context" lay-skin="primary" value="交通事故案情核查">交通事故案情核查&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
						<input type="checkbox" name="context" lay-skin="primary" value="其他证明证物核查">其他证明证物核查<br />
						<input type="checkbox" name="context" lay-skin="primary" value="人员损伤情况调查">人员损伤情况调查&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
						<input type="checkbox" name="context" lay-skin="primary" value="其他委托">其他委托
					</td>
				</tr>
				<td style="width: 110px;"><span class="x-red">*</span>资料处理</td>
				<td colspan="5"><input type="radio" name="num2" checked="checked"
					value="查勘材料由保户带回" />查勘材料由保户带回&emsp;&emsp;&emsp;&nbsp;&nbsp; <input
					type="radio" name="num2" value="查勘材料寄回承保公司" />查勘材料寄回承保公司&emsp;&emsp;&emsp;&nbsp;&nbsp;
					<input type="radio" name="num2" value="通过邮箱发送到承保公司" />通过邮箱发送到承保公司&emsp;&emsp;&emsp;&nbsp;&nbsp;
				</td>
				<tr>
				</tr>
				<tr>
					<td style="width: 110px;"><span class="x-red">*</span>委托机构</td>
					<td colspan="5"><input type="hidden" id="entrustCompanyId"
						name="entrustCompanyId"
						value="${sessionScope.entrust.entrustCompanyId}"> <input
						type="text" id="num3" name="num3" required="" lay-verify="email"
						autocomplete="off" class="layui-input"
						<c:if test="${sessionScope.entrust != null}">value="${sessionScope.entrust.num3}"</c:if> /></td>
				</tr>
				<tr>
					<td style="width: 110px;"><span class="x-red">*</span>委托任务</td>
					<td colspan="5"><input type="checkbox" name="mission"
						lay-skin="primary" value="现场查勘">现场查勘&nbsp;&nbsp; <input
						type="checkbox" name="mission" lay-skin="primary" value="本车定损">本车定损&nbsp;&nbsp;
						<input type="checkbox" name="mission" lay-skin="primary" value="物损定损">物损定损&nbsp;&nbsp;
						<input type="checkbox" name="mission" lay-skin="primary" value="医疗查勘">医疗查勘&nbsp;&nbsp;
						<input type="checkbox" name="mission" lay-skin="primary" value="核价">核价&nbsp;&nbsp;
						<input type="checkbox" name="mission" lay-skin="primary" value="核损">核损&nbsp;&nbsp;
						<input type="checkbox" name="mission" lay-skin="primary" value="立案">立案&nbsp;&nbsp;
						<input type="checkbox" name="mission" lay-skin="primary" value="核赔">核赔&nbsp;&nbsp;
						<input type="checkbox" name="mission" lay-skin="primary" value="预赔">预赔&nbsp;&nbsp;
						<input type="checkbox" name="mission" lay-skin="primary" value="结案">结案&nbsp;&nbsp;
						<input type="checkbox" name="mission" lay-skin="primary" value="支付">支付</td>
				</tr>
				<tr>
					<td colspan="6"><div class="layui-form-item"
							style="margin-left: 200px;">
							<label for="L_repass" class="layui-form-label"> </label> <input id="dosubmit"
								type="submit" class="layui-btn layui-btn-radius" style="float: right;" value="保存" />
						</div></td>

				</tr>

			</form>
		</table>
	</div>
	<script>
		layui.use([ 'form', 'layer' ], function() {
			$ = layui.jquery;
			var form = layui.form, layer = layui.layer;

			//自定义验证规则
			form.verify({
				nikename : function(value) {
					if (value.length < 5) {
						return '昵称至少得5个字符啊';
					}
				},
				pass : [ /(.+){6,12}$/, '密码必须6到12位' ],
				repass : function(value) {
					if ($('#L_pass').val() != $('#L_repass').val()) {
						return '两次密码不一致';
					}
				}
			});

			//监听提交
			form.on('submit(add)', function(data) {
				console.log(data);
				//发异步，把数据提交给php
				layer.alert("增加成功", {
					icon : 6
				}, function() {
					// 获得frame索引
					var index = parent.layer.getFrameIndex(window.name);
					//关闭当前frame
					parent.layer.close(index);
				});
				return false;
			});

		});
	</script>
	<script>
		var _hmt = _hmt || [];
		(function() {
			var hm = document.createElement("script");
			hm.src = "https://hm.baidu.com/hm.js?b393d153aeb26b46e9431fabaf0f6190";
			var s = document.getElementsByTagName("script")[0];
			s.parentNode.insertBefore(hm, s);
		})();
	</script>
</body>

</html>